home *** CD-ROM | disk | FTP | other *** search
INI File | 2006-09-13 | 2.0 KB | 110 lines |
- [SUBJECT]
- Description=Scrolls HTML elements within a DIV tag
- ImageIndex=-1
- Folder=Graphical Effects
-
-
- [BODY_TAG]
- ;onLoad="start()"
-
-
- [BODY_TEXT]
- ;<div id="point1" style="position:absolute;visibility:visible;">
- ;<img src="`image`" width="`width`" height="`height`" border="0" alt="">
- ;</div>
- ;
- ;<script language="JavaScript">
- ;<!-- Begin
- ;// Original: Bruce W.Anderson (appletlib@about.com)
- ;// Web Site: http://appletlib.tripod.com/dhtml/elevator.html
- ;
- ;// This script and many more are available free online at
- ;// The JavaScript Source!! http://javascript.internet.com
- ;
- ;var xPos = 20;
- ;var step = 1;
- ;var delay = `delay`;
- ;var yPos = 0;
- ;var height = 0;
- ;var offset = 0;
- ;var yon = 0;
- ;var name = navigator.appName;
- ;if (name == "Microsoft Internet Explorer") {
- ;yPos = document.body.clientHeight;
- ;point1.style.top = yPos;
- ;}
- ;else {
- ;yPos = window.innerHeight;
- ;document.point1.pageY = yPos;
- ;document.point1.visibility = "hidden";
- ;}
- ;function changePos() {
- ;if (yon == 0) {
- ;yPos = yPos - step;
- ;}
- ;else {
- ;yPos = yPos + step;
- ;}
- ;if (name == "Microsoft Internet Explorer") {
- ;height = document.body.clientHeight;
- ;offset = point1.offsetHeight;
- ;}
- ;else {
- ;height = window.innerHeight;
- ;offset = document.point1.clip.height;
- ;}
- ;if (yPos < 0) {
- ;yon = 1;
- ;yPos = 0;
- ;}
- ;if (yPos >= (height - offset)) {
- ;yon = 0;
- ;yPos = (height - offset);
- ;}
- ;if (name == "Microsoft Internet Explorer") {
- ;point1.style.left = xPos;
- ;point1.style.top = yPos + document.body.scrollTop;
- ;}
- ;else {
- ;document.point1.pageX = xPos;
- ;document.point1.pageY = yPos + window.pageYOffset;
- ; }
- ;}
- ;function start()
- ;{
- ;if (name != "Microsoft Internet Explorer") {
- ;document.point1.visibility = "visible";
- ;}
- ;loopfunc();
- ;}
- ;function loopfunc()
- ;{
- ;changePos();
- ;setTimeout('loopfunc()',delay);
- ;}
- ;// End -->
- ;</script>
-
-
-
- [`image`]
- Kind=U
- Value=image1.gif
-
-
- [`width`]
- Kind=N
- Value=150
-
-
- [`height`]
- Kind=N
- Value=48
-
-
-
- [`delay`]
- Kind=N
- Value=30
-
-